﻿<%@ Page Title="Profissionais" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="CadastroProfissional.aspx.cs" Inherits="AcadPosApp.Cadastros.CadastroProfissional" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <style type="text/css">
        .style1
        {
        }
        .style2
        {
            width: 100%;
        }
        .style4
        {
            width: 310px;
        }
        .style9
        {
            width: 311px;
        }
        .style10
        {
            width: 313px;
        }
        .style12
        {
            width: 146px;
        }
        .style13
        {
            width: 148px;
        }
        .style14
        {
            width: 149px;
        }
        .style16
        {
            width: 180px;
        }
        .style18
        {
            width: 316px;
        }
        .style19
        {
            width: 160px;
        }
        .style20
        {
            width: 157px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlConsulta" runat="server" GroupingText="Consulta de Profissionais">
        <table class="form-inline">
            <tr>
                <td class="style10">
                    <asp:Label ID="Label1" runat="server" Text="Descrição"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtPesquisa" runat="server" Width="300px" MaxLength="50" required="required"></asp:TextBox>
                </td>
                <td>
                    <br />
                    <asp:Button ID="btnConsultar" runat="server" Text="Consultar" 
                        OnClick="btnConsultar_Click" Width="100px" />
                </td>
            </tr>
        </table>
        <br />
        <asp:GridView ID="gvwProfissionais" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CssClass="mGrid" EmptyDataText="Dados não localizados..." GridLines="Vertical"
            OnPageIndexChanging="gvwProfissionais_PageIndexChanging" OnRowDataBound="gvwProfissionais_RowDataBound"
            Width="45%" OnSelectedIndexChanged="gvwProfissionais_SelectedIndexChanged" OnRowCommand="gvwProfissionais_RowCommand"
            OnRowCreated="gvwProfissionais_RowCreated" 
            DataKeyNames="ID_PROFISSIONAL,EMAIL" HorizontalAlign="Justify">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True" />
                <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Editar usuário!">
                            <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/edit.png" Text="Alterar"
                                Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Excluir usuário!">
                            <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                Text="Excluir" Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="NOME" HeaderText="Nome">
                    <ItemStyle HorizontalAlign="Left" Width="85%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="SITUACAO" HeaderText="Status">
                    <ItemStyle HorizontalAlign="Center" Width="25%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Dados Pessoais" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Relatório de Dados Pessoais!">
                            <asp:ImageButton ID="ImgRelatorio" runat="server" CausesValidation="false" CommandName="Relatorio"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/print.png" Text="Alterar"
                                Width="30px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <div class="legenda">
            <asp:Button ID="btnInserir" runat="server" Text="Inserir" Width="100px" 
                OnClick="btnInserir_Click" formnovalidate="formnovalidate" />
            &nbsp;<asp:Button ID="btnTitulacao" runat="server" Text="Titulação" 
                Width="100px" OnClick="btnTitulacao_Click" formnovalidate=""
                Visible="False" />
            &nbsp;<asp:Button ID="btnDisciplinas" runat="server" Text="Disciplinas" 
                Width="100px" OnClick="btnDisciplinas_Click" formnovalidate="" 
                Visible="False" />
            &nbsp;<asp:Button ID="btnDocumentos" runat="server" Text="Documentos" 
                Width="100px" Visible="False" formnovalidate="" 
                OnClick="btnDocumentos_Click" />
        </div><br />
    </asp:Panel>
    <br />
    <asp:Panel ID="pnlCadastro" runat="server" GroupingText="Cadastro de Profissionais"
        Visible="False">
        <table class="form-inline">
            <tr>
                <td colspan="6">
                    <asp:Label ID="Label4" runat="server" Text="CPF"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtCPF" required="required" pattern="[0-9]+$" 
                        title="Apenas números." runat="server"
                        Width="300px" MaxLength="11" AutoPostBack="True" 
                        OnTextChanged="TxtCPF_TextChanged"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6">
                    <asp:Label ID="Label5" runat="server" Text="Nome"></asp:Label>
                    <br />
                    <!-- <asp:TextBox ID="TxtNome" required="required" pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" -->
                        <asp:TextBox ID="TxtNome" required="required" pattern="^((.)(?!\2{3,}))+$" title="Somente são permitidos 3 caracteres iguais e consecutivos."
                            runat="server" MaxLength="150" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label6" runat="server" Text="RG"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtRG" required="required" pattern="[0-9]+$" 
                        title="Apenas números." runat="server"
                        MaxLength="20" Width="300px"></asp:TextBox>
                </td>
                <td class="style19">
                    <asp:Label ID="Label7" runat="server" Text="Órgão Expedidor"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtOrgaoExpedidor" runat="server" MaxLength="5" pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$"
                        required="" title="Apenas Letras." Width="150px"></asp:TextBox>
                </td>
                <td class="style20">
                    <asp:Label ID="Label8" runat="server" Text="UF"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlUFRG" runat="server" required="" Width="150px">
                        <asp:ListItem Value="AC">AC</asp:ListItem>
                        <asp:ListItem Value="AL">AL</asp:ListItem>
                        <asp:ListItem Value="AM">AM</asp:ListItem>
                        <asp:ListItem Value="AP">AP</asp:ListItem>
                        <asp:ListItem Value="BA">BA</asp:ListItem>
                        <asp:ListItem Value="CE">CE</asp:ListItem>
                        <asp:ListItem Value="DF">DF</asp:ListItem>
                        <asp:ListItem Value="ES">ES</asp:ListItem>
                        <asp:ListItem Value="GO">GO</asp:ListItem>
                        <asp:ListItem Value="MA">MA</asp:ListItem>
                        <asp:ListItem Value="MG">MG</asp:ListItem>
                        <asp:ListItem Value="MS">MS</asp:ListItem>
                        <asp:ListItem Value="MT">MT</asp:ListItem>
                        <asp:ListItem Value="PA">PA</asp:ListItem>
                        <asp:ListItem Value="PB">PB</asp:ListItem>
                        <asp:ListItem Value="PE">PE</asp:ListItem>
                        <asp:ListItem Value="PI">PI</asp:ListItem>
                        <asp:ListItem Value="PR">PR</asp:ListItem>
                        <asp:ListItem Value="RJ">RJ</asp:ListItem>
                        <asp:ListItem Value="RN">RN</asp:ListItem>
                        <asp:ListItem Value="RO">RO</asp:ListItem>
                        <asp:ListItem Value="RR">RR</asp:ListItem>
                        <asp:ListItem Value="RS">RS</asp:ListItem>
                        <asp:ListItem Value="SC">SC</asp:ListItem>
                        <asp:ListItem Selected="True" Value="SE">SE</asp:ListItem>
                        <asp:ListItem Value="SP">SP</asp:ListItem>
                        <asp:ListItem Value="TO">TO</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style12">
                    <asp:Label ID="Label9" runat="server" Text="Data Expedição"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtDataExpedicao" CssClass="form-control" runat="server" MaxLength="10"
                        required="" Width="150px"></asp:TextBox>
                    <asp:CalendarExtender ID="TxtDataExpedicao_CalendarExtender" runat="server" Enabled="True"
                        TargetControlID="TxtDataExpedicao">
                    </asp:CalendarExtender>
                    <%--<asp:CalendarExtender ID="TxtDataExpedicao_CalendarExtender" runat="server" Enabled="True"
                        TargetControlID="TxtDataExpedicao">
                    </asp:CalendarExtender>--%>
                </td>
                <td>
                    <br />
                </td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label11" runat="server" Text="Nacionalidade"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtNacionalidade" runat="server" MaxLength="50" 
                        pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                        Style="margin-bottom: 0px" title="Apenas Letras." Width="300px"></asp:TextBox>
                </td>
                <td class="style19">
                    <asp:Label ID="Label10" runat="server" Text="Naturalidade"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtNaturalidade" runat="server" MaxLength="50" 
                        pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                        title="Apenas Letras." Width="150px"></asp:TextBox>
                </td>
                <td class="style20">
                    <asp:Label ID="Label12" runat="server" Text="UF Naturalidade"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlUFNaturalidade" runat="server" required="" 
                        Width="150px">
                        <asp:ListItem Value="AC">AC</asp:ListItem>
                        <asp:ListItem Value="AL">AL</asp:ListItem>
                        <asp:ListItem Value="AM">AM</asp:ListItem>
                        <asp:ListItem Value="AP">AP</asp:ListItem>
                        <asp:ListItem Value="BA">BA</asp:ListItem>
                        <asp:ListItem Value="CE">CE</asp:ListItem>
                        <asp:ListItem Value="DF">DF</asp:ListItem>
                        <asp:ListItem Value="ES">ES</asp:ListItem>
                        <asp:ListItem Value="GO">GO</asp:ListItem>
                        <asp:ListItem Value="MA">MA</asp:ListItem>
                        <asp:ListItem Value="MG">MG</asp:ListItem>
                        <asp:ListItem Value="MS">MS</asp:ListItem>
                        <asp:ListItem Value="MT">MT</asp:ListItem>
                        <asp:ListItem Value="PA">PA</asp:ListItem>
                        <asp:ListItem Value="PB">PB</asp:ListItem>
                        <asp:ListItem Value="PE">PE</asp:ListItem>
                        <asp:ListItem Value="PI">PI</asp:ListItem>
                        <asp:ListItem Value="PR">PR</asp:ListItem>
                        <asp:ListItem Value="RJ">RJ</asp:ListItem>
                        <asp:ListItem Value="RN">RN</asp:ListItem>
                        <asp:ListItem Value="RO">RO</asp:ListItem>
                        <asp:ListItem Value="RR">RR</asp:ListItem>
                        <asp:ListItem Value="RS">RS</asp:ListItem>
                        <asp:ListItem Value="SC">SC</asp:ListItem>
                        <asp:ListItem Selected="True" Value="SE">SE</asp:ListItem>
                        <asp:ListItem Value="SP">SP</asp:ListItem>
                        <asp:ListItem Value="TO">TO</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style12">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label13" runat="server" Text="Gênero"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label14" runat="server" Text="Estado Civil"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlGenero" runat="server" required="" Width="145px">
                        <asp:ListItem Value="F">Feminino</asp:ListItem>
                        <asp:ListItem Value="M">Masculino</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                    <asp:DropDownList ID="ddlEstadoCivil" runat="server" Height="30px" 
                        Width="145px">
                        <asp:ListItem>Solteiro(a)</asp:ListItem>
                        <asp:ListItem>Casado(a)</asp:ListItem>
                        <asp:ListItem>Divorciado(a)</asp:ListItem>
                        <asp:ListItem>Viúvo(a)</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style19">
                    <asp:Label ID="Label15" runat="server" Text="Situação"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlSituacao" runat="server" Width="150px">
                        <asp:ListItem Value="A">Ativo</asp:ListItem>
                        <asp:ListItem Value="I">Inativo</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style20">
                    <br />
                </td>
                <td class="style12">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label39" runat="server" Text="Nº ISS"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label40" runat="server" Text="Nº PIS"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtISS" runat="server" Width="145px"></asp:TextBox>
                    &nbsp;
                    <asp:TextBox ID="TxtPIS" runat="server" Width="145px"></asp:TextBox>
                </td>
                <td class="style19">
                    <asp:Label ID="Label41" runat="server" Text="Nº Reg. Profissional"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtNumRegProfissional" runat="server" Width="150px"></asp:TextBox>
                    <br />
                </td>
                <td class="style20">
                    <br />
                </td>
                <td class="style12">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="6">
                    <asp:Label ID="Label16" runat="server" Text="E-mail"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtEmail" CssClass="form-control" required="required" 
                        type="email" runat="server"
                        Width="300px" Height="30px" MaxLength="150"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label17" runat="server" Text="Telefone"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtDDDFone" type="text" runat="server" name="dddfone"  
                        MaxLength="4" pattern="[0-9]+$" placeholder="0XX" 
                    required="required" Width="60px"></asp:TextBox>
                    &nbsp;<asp:TextBox ID="TxtTelefone" placeholder="XXXX-XXXX" name="phone" pattern="[0-9]{4,6}-[0-9]{3,4}$"
                        required="required" runat="server" Width="110px" MaxLength="9"></asp:TextBox>
                    &nbsp;
                </td>
                <td colspan="4">
                    &nbsp;&nbsp;<asp:Label ID="Label18" runat="server" Text="Celular"></asp:Label>
                    <br />
                    &nbsp;<asp:TextBox ID="TxtDDDCel" runat="server" MaxLength="3" name="dddcell" pattern="[0-9]+$"
                        placeholder="0XX" Width="60px" type="text"></asp:TextBox>
                    &nbsp;<asp:TextBox ID="TxtCel" runat="server" MaxLength="9" name="cell" 
                        pattern="[0-9]{4,6}-[0-9]{3,4}$" placeholder="XXXX-XXXX" Width="110px"></asp:TextBox>
                    <br />
                </td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label19" runat="server" Text="Pai"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtPai" runat="server" MaxLength="150" 
                        pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" title="Apenas Letras." 
                        Width="300px"></asp:TextBox>
                </td>
                <td colspan="4">
                    <asp:Label ID="Label20" runat="server" Text="Mãe"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtMae" runat="server" MaxLength="150" 
                        pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                        title="Apenas Letras." Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="6">
                    <asp:Label ID="Label21" runat="server" Text="CEP"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtCEP" required placeholder="48330000" title="Apenas números."
                        Height="30px" pattern="[0-9]+$" formnovalidate="formnovalidate" runat="server"
                        Width="200px" MaxLength="8"></asp:TextBox>
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnConsultarCEP" formnovalidate="formnovalidate" runat="server" Text="Consultar"
                        OnClick="btnConsultarCEP_Click" Height="30px" />
                </td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:Label ID="Label36" runat="server" Text="Endereço"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtEndereco" runat="server" MaxLength="200" Width="300px"></asp:TextBox>
                </td>
                <td colspan="5">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:Label ID="Label24" runat="server" Text="Número"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtNumero" runat="server" MaxLength="5" pattern="[0-9]+$" 
                        required="" title="Apenas números." Width="150px"></asp:TextBox>
                </td>
                <td colspan="5">
                    <asp:Label ID="Label23" runat="server" Text="Complemento"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtComplemento" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                    <br />
                </td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:Label ID="Label38" runat="server" Text="Bairro"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtBairro" runat="server" MaxLength="50" Width="300px"></asp:TextBox>
                </td>
                <td colspan="5">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:Label ID="Label26" runat="server" Text="Cidade"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtCidade" runat="server" MaxLength="50" 
                        pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" title="Apenas Letras." 
                        Width="300px"></asp:TextBox>
                </td>
                <td colspan="5">
                    <asp:Label ID="Label29" runat="server" Text="UF"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlUF" runat="server" Width="150px">
                        <asp:ListItem Value="AC">AC</asp:ListItem>
                        <asp:ListItem Value="AL">AL</asp:ListItem>
                        <asp:ListItem Value="AM">AM</asp:ListItem>
                        <asp:ListItem Value="AP">AP</asp:ListItem>
                        <asp:ListItem Value="BA">BA</asp:ListItem>
                        <asp:ListItem Value="CE">CE</asp:ListItem>
                        <asp:ListItem Value="DF">DF</asp:ListItem>
                        <asp:ListItem Value="ES">ES</asp:ListItem>
                        <asp:ListItem Value="GO">GO</asp:ListItem>
                        <asp:ListItem Value="MA">MA</asp:ListItem>
                        <asp:ListItem Value="MG">MG</asp:ListItem>
                        <asp:ListItem Value="MS">MS</asp:ListItem>
                        <asp:ListItem Value="MT">MT</asp:ListItem>
                        <asp:ListItem Value="PA">PA</asp:ListItem>
                        <asp:ListItem Value="PB">PB</asp:ListItem>
                        <asp:ListItem Value="PE">PE</asp:ListItem>
                        <asp:ListItem Value="PI">PI</asp:ListItem>
                        <asp:ListItem Value="PR">PR</asp:ListItem>
                        <asp:ListItem Value="RJ">RJ</asp:ListItem>
                        <asp:ListItem Value="RN">RN</asp:ListItem>
                        <asp:ListItem Value="RO">RO</asp:ListItem>
                        <asp:ListItem Value="RR">RR</asp:ListItem>
                        <asp:ListItem Value="RS">RS</asp:ListItem>
                        <asp:ListItem Value="SC">SC</asp:ListItem>
                        <asp:ListItem Selected="True" Value="SE">SE</asp:ListItem>
                        <asp:ListItem Value="SP">SP</asp:ListItem>
                        <asp:ListItem Value="TO">TO</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="style16">
                    <asp:Label ID="Label42" runat="server" Text="Banco"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlBanco" runat="server" required="" Width="300px">
                    </asp:DropDownList>
                </td>
                <td class="style19">
                    <asp:Label ID="Label43" runat="server" Text="Agência"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtAgencia" runat="server" MaxLength="10" required="" 
                        Width="150px"></asp:TextBox>
                </td>
                <td class="style20">
                    <asp:Label ID="Label44" runat="server" Text="Conta"></asp:Label>
                    <br />
                    <asp:TextBox ID="TxtConta" runat="server" MaxLength="10" required="" 
                        Width="150px"></asp:TextBox>
                </td>
                <td class="style12">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <!-- <tr>
                <td class="style1" colspan="6">
                    <asp:CheckBox ID="ChkAtivo" runat="server" Checked="True" Text="Ativo?" 
                        Width="150px" />
                    &nbsp; &nbsp;
                </td>
            </tr> -->
        </table>    
        <br />    
        <div class="legenda">
            <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" 
                OnClick="btnConfirmar_Click" Width="100px" />
            &nbsp;
            <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" 
                OnClick="btnCancelar_Click" Width="100px" formnovalidate="formnovalidate"/>
        </div><br />
    </asp:Panel>
    <br />
    <asp:Panel ID="pnlTitulacoes" runat="server" GroupingText="Titulações" Visible="False">
        <asp:GridView ID="gvwTitulacoes" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CssClass="mGrid" DataKeyNames="ID_PROFISSIONAL_TITULACAO" EmptyDataText="Dados não localizados..."
            GridLines="Vertical" OnRowCommand="gvwTitulacoes_RowCommand" OnRowCreated="gvwTitulacoes_RowCreated"
            OnRowDataBound="gvwTitulacoes_RowDataBound" Width="95%" 
            onpageindexchanging="gvwTitulacoes_PageIndexChanging">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Editar Titulação!">
                            <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/edit.png" Text="Alterar"
                                Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Excluir titulação!">
                            <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                Text="Excluir" Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="NIVEL" HeaderText="Nível">
                    <ItemStyle HorizontalAlign="Left" Width="30%" />
                </asp:BoundField>
                <asp:BoundField DataField="TITULO" HeaderText="Título">
                    <ItemStyle HorizontalAlign="Left" Width="30%" />
                </asp:BoundField>
                <asp:BoundField DataField="ANO_CONCLUSAO" HeaderText="Ano Conclusão">
                    <ItemStyle HorizontalAlign="Center" Width="10%" />
                </asp:BoundField>
                <asp:BoundField DataField="INSTITUICAO" HeaderText="Instituição">
                    <ItemStyle HorizontalAlign="Left" Width="30%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="SITUACAO" HeaderText="Status">
                    <ItemStyle HorizontalAlign="Center" Width="25%" />
                </asp:BoundField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <br />
        <div class="legenda">
            <asp:Button ID="btnInserirTitulacao" runat="server" OnClick="btnInserirTitulacao_Click" formnovalidate=""
                Text="Inserir" Width="100px" /> &nbsp;
            <asp:Button ID="btnCancelar0" runat="server" formnovalidate="" 
                OnClick="btnCancelar_Click" Text="Cancelar" Width="100px" />
        </div>
        <br />
        <br />
    </asp:Panel>
    <br />
        <asp:Panel ID="pnlCadastroTitulacao" runat="server" GroupingText="Cadastro de Titulações"
            Visible="False">
            <table class="style2">
                <tr>
                    <td colspan="2">
                        <asp:Label ID="Label45" runat="server" Text="Nível de Titulação"></asp:Label>
                        <br />
                        <asp:DropDownList ID="ddlNivelTitulacao" runat="server" Width="300px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        <asp:Label ID="Label46" runat="server" Text="Titulação"></asp:Label>
                        <br />
                        <asp:TextBox ID="TxtTitulacao" required type="text" runat="server" Width="300px"
                            MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="Label47" runat="server" Text="Ano Conclusão"></asp:Label>
                        <br />
                        <asp:DropDownList ID="ddlAnoConclusao" runat="server" Width="150px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="Label48" runat="server" Text="Instituição"></asp:Label>
                        <br />
                        <asp:TextBox ID="TxtInstituicao" type="text" required runat="server" Width="300px"
                            MaxLength="100"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="Label49" runat="server" Text="Situação"></asp:Label>
                        <br />
                        <asp:DropDownList ID="ddlSituacaoTitulacao" runat="server" Width="150px">
                            <asp:ListItem Value="A">Ativo</asp:ListItem>
                            <asp:ListItem Value="I">Inativo</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <br />
            <div class="legenda">
                <asp:Button ID="btnConfirmarTitulacao" runat="server" Text="Confirmar" formnovalidate="" 
                    OnClick="btnConfirmarTitulacao_Click" Width="100px" />
                &nbsp;<asp:Button ID="btnCancelarTitulacao" runat="server" formnovalidate="" OnClick="btnCancelarTitulacao_Click"
                    Text="Cancelar" Width="100px" />
            </div><br />
        </asp:Panel>
    <br />
    <asp:Panel ID="pnlDisciplinas" runat="server" GroupingText="Disciplinas Compatíveis com a Formação"
        Visible="False">
        <asp:GridView ID="gvwDiscCompativeisFormacao" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CssClass="mGrid" DataKeyNames="ID_PROFISSIONAL_DISCIPLINA" EmptyDataText="Dados não localizados..."
            GridLines="Vertical" Width="95%" OnRowCommand="gvwDiscCompativeisFormacao_RowCommand"
            OnRowCreated="gvwDiscCompativeisFormacao_RowCreated" OnRowDataBound="gvwDiscCompativeisFormacao_RowDataBound">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Excluir usuário!">
                            <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                Text="Excluir" Width="20px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="DISCIPLINA" HeaderText="Disciplina">
                    <ItemStyle HorizontalAlign="Left" Width="30%" />
                </asp:BoundField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <br />
        <div class="legenda">
            <asp:Button ID="btnInserirDisc" runat="server" Text="Inserir" Width="100px" formnovalidate="" 
                OnClick="btnInserirDisc_Click" />
            &nbsp;<asp:Button ID="btnCancelarDiscCompativeis" runat="server" 
                onclick="btnCancelarDiscCompativeis_Click" Text="Cancelar" Width="100px" />
        </div>
        <br />
    </asp:Panel>
    <br />
        <asp:Panel ID="pnlCadastroDisc" runat="server" GroupingText="Cadastro de Disciplinas Compatíveis com a Formação do Profissional"
            Visible="False">
            <table class="style2">
                <tr>
                    <td class="style9">
                        <asp:Label ID="Label50" runat="server" Text="Descrição"></asp:Label>
                        <br />
                        <asp:TextBox ID="TxtPesquisaDisc" runat="server" Width="300px"></asp:TextBox>
                    </td>
                    <td>
                        <br />
                        <asp:Button ID="btnPesquisaDisc" runat="server" Text="Consultar" formnovalidate="" 
                            OnClick="btnPesquisaDisc_Click1" Width="100px" />
                    </td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="gvwPesquisaDisc" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                CssClass="mGrid" DataKeyNames="ID_DISCIPLINA" EmptyDataText="Dados não localizados..."
                GridLines="Vertical" Width="95%" 
                onpageindexchanging="gvwPesquisaDisc_PageIndexChanging">
                <AlternatingRowStyle BackColor="#D3D3D3" />
                <Columns>
                    <asp:CommandField ButtonType="Image" SelectImageUrl="~/App_Themes/img/Selecionar.png"
                        ShowSelectButton="True" />
                    <asp:BoundField DataField="DESCRICAO" HeaderText="Disciplina">
                        <ItemStyle HorizontalAlign="Left" Width="100%" />
                    </asp:BoundField>
                </Columns>
                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#808080" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#383838" />
            </asp:GridView>
            <br />
            <div class="legenda">
                <asp:Button ID="btnConfirmarDisc" runat="server" Text="Confirmar" formnovalidate="" 
                    OnClick="btnConfirmarDisc_Click" Width="100px" />
                &nbsp;<asp:Button ID="btnCancelarDisc" runat="server" formnovalidate="" OnClick="btnCancelarDisc_Click"
                    Text="Cancelar" Width="100px" />
            </div><br />
        </asp:Panel>
    <br />
    <asp:Panel ID="pnlDocumetos" runat="server" GroupingText="Cadastro de Documentos Pendentes"
        Visible="False">
        <table class="style13">
            <tr>
                <td class="style14">
                    <asp:Label ID="Label37" runat="server" Text="Documento"></asp:Label>
                    <br />
                    <asp:DropDownList ID="ddlDocumento" runat="server" Width="300px">
                    </asp:DropDownList>
                </td>
                <td>
                    <br />
                    <asp:Button ID="btnIncluirDoc" runat="server" Text="Incluir" OnClick="btnIncluirDoc_Click"
                        Width="100px" />
                </td>
            </tr>
        </table>
        <br />
        <asp:GridView ID="gvwDocPendente" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CssClass="mGrid" EmptyDataText="Dados não localizados..." GridLines="Vertical"
            Width="95%" DataKeyNames="ID_DOCUMENTO" OnRowCommand="gvwDocPendente_RowCommand"
            OnRowCreated="gvwDocPendente_RowCreated" OnRowDataBound="gvwDocPendente_RowDataBound">
            <AlternatingRowStyle BackColor="#D3D3D3" />
            <Columns>
                <asp:TemplateField HeaderText="Quitar Pendência" ShowHeader="False">
                    <ItemTemplate>
                        <abbr title="Quitar pendência!">
                            <asp:ImageButton ID="ImgRemover" runat="server" CausesValidation="false" CommandName="Remover"
                                formnovalidate="formnovalidate" ImageUrl="~/Imagens/quitar.png" OnClientClick="return ShowConfirm('Tem certeza que deseja quitar esta pendência?', this.ID);"
                                Text="Remover Pendência" Width="25px" />
                        </abbr>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                </asp:TemplateField>
                <asp:BoundField DataField="DESCRICAO" HeaderText="Documento">
                    <ItemStyle HorizontalAlign="Left" Width="100%" />
                </asp:BoundField>
            </Columns>
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
        </asp:GridView>
        <div class="legenda">
            <asp:Button ID="btnCancelarDoc" runat="server" OnClick="btnCancelarDoc_Click" Text="Cancelar"
                Width="100px" />
        </div>
        <br />
    </asp:Panel>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlRelatorios" runat="server" GroupingText="Relatórios do Profissional"
                Visible="False">
                <asp:RadioButtonList ID="rbTipoRel" runat="server" RepeatColumns="2" TabIndex="2">
                    <asp:ListItem Selected="True">Contrato do Professor</asp:ListItem>
                    <asp:ListItem>Dados Pessoais</asp:ListItem>
                    <asp:ListItem>Contrato do Gestor</asp:ListItem>
                </asp:RadioButtonList>
                <br />
                <div class="legenda">
                    <asp:Button ID="btnImprimir" runat="server" Text="Imprimir" Width="100px" 
                        OnClick="btnImprimir_Click" />
                    &nbsp;<asp:Button ID="btnCancelarRel" formnovalidate="formnovalidate" 
                        runat="server" OnClick="btnCancelarRel_Click"
                        Text="Cancelar" Width="100px" CausesValidation="False" />
                </div><br />
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnImprimir" />
            <asp:PostBackTrigger ControlID="gvwProfissionais" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
